<template>
  <div class="container-com-a">
      a组件：{{msg}}
  </div>
</template>

<script>
import eventBus from '@/eventBus'
export default {
    name:'com-a',
    data(){
        return{
            msg:''
        }
    },
    created(){
        // 接收数据data
        eventBus.$on('b2a',data=>{
            this.msg=data
        })
    }

}
</script>
 
<style>

</style>